package com.roy.web.controller.employee;

import com.roy.domain.entity.RoyEmployee;
import com.roy.service.IRoyEmployeeService;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 用户信息
 *
 * @author ruoyi
 */
@RestController
@RequestMapping("/roy/employee")
public class RoyEmployeeController extends BaseController {
    @Autowired
    private IRoyEmployeeService employeeService;


    /**
     * 获取员工列表
     */
//    @Anonymous
//    @PreAuthorize("@ss.hasPermi('system:user:list')")
    @GetMapping("/list")
    public TableDataInfo list(RoyEmployee employee) {
        startPage();
        List<RoyEmployee> list = employeeService.selectEmployeeList(employee);
        return getDataTable(list);
    }


}
